module.exports = (directory, filter, callback)->
	fs = require 'fs'
	path = require 'path'
	fs.readdir directory, (err, list) ->
		return callback(err) if err
		list = list.filter (file)->
			return path.extname(file) == '.'+filter
		callback(err, list)
